<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>随机页面</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <script src="../../script/vue.min.js"></script>
    <script src="../../script/fastclick.js"></script>
    <style>
        #wrap {
            height: 100%;
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-flow: column;
            flex-flow: column;
        }
        #header {
            background: #fbdb0a;
            color: #000;
        }
        #main {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            flex: 1;
        }
    </style>
</head>

<body>
    <div v-cloak id="wrap">
        <header id="header" class="aui-bar aui-bar-nav">
            <a class="aui-pull-left">
                <span class="aui-iconfont aui-icon-left" style="color:#000" @click="leftWin" id="headerBack">{{headerBack}}</span>
            </a>
            <div class="aui-title" id="headerText">详情</div>
        </header>
        <div id="main" class="flex-con" style="height: 800px"></div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript">
apiready = function() {
    open();
    FastClick.attach(document.body);
    var vm = new Vue({
        el: '#wrap',
        data: {
            headerBack: '热门',
            headerText: 'loading...'
        },
        methods: {
            leftWin: function() {
                api.closeWin();
                // api.openWin({
                //     name: 'home',
                //     url: 'home.html'
                // });
            }
        },
        created: function() {
        },
        mounted: function() {

          this.headerBack = api.pageParam.title;
        },
    })
};


var header, headerPos, main, mainPos

function open() {
    header = $api.byId('header');
    //适配iOS 7+，Android 4.4+状态栏
    $api.fixStatusBar(header);
    headerPos = $api.offset(header);
    main = $api.byId('main');
    mainPos = $api.offset(main);
    api.openFrame({
        name: 'wrap_detail_frame',
        url: 'wrap_detail_frame.html',
        bounces: false,
        pageParam: {
          name: api.pageParam.name,
          logo: api.pageParam.logo,
          feature: api.pageParam.feature,
          limit: api.pageParam.limit,
          rate: api.pageParam.rate,
          successNum: api.pageParam.successNum,
          successRate: api.pageParam.successRate,
          key: api.pageParam.key,
          memo: api.pageParam.memo,
          link: api.pageParam.link
        },
        animation: {
          type:"none",                //动画类型（详见动画类型常量）
          subType:"from_right",       //动画子类型（详见动画子类型常量）
          duration:300
        },
        rect: {
            x: 0,
            y: headerPos.h,
            w: 'auto'
        }
    });
}
</script>

</html>
